﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="reportCustomer.aspx.cs" Inherits="PeisongWeb.admin.reportCustomer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>

<%@ Register TagName="top" Src="controls/top.ascx" TagPrefix="uc1" %>
<%@ Register TagName="menu" Src="controls/menu.ascx" TagPrefix="uc2" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>配送单</title>
    <!--#include file="style.inc"-->
     <style type="text/css">
        div#admin_list_content table a:link
        {
            color:#4ac15b;
            text-decoration: none;
        }
        div#admin_list_content table a:visited
        {
            color:#8c360b;
            text-decoration:underline;
        }
        div#admin_list_content table a:hover
        {
            color:#4ac15b;
            text-decoration: underline;
        }
        div#admin_list_content table a:active
        {
            color:#4ac15b;
            text-decoration: underline;
        }
    </style>
    <script language="javascript" type="text/javascript">
        function openDetail() {
            if (document.getElementById("txtRbno").value != "") {
                window.open('reportcustomerDetail.aspx?rb=' + document.getElementById("txtRbno").value + '&companyName=' + encodeURIComponent(document.getElementById("txtCompany").value));
            } else {
                alert("请输入提货单号。");
                return false;
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <ext:ScriptManager ID="ScriptManager1" runat="server" />
    <uc1:top ID="Top1" runat="server" />
      <uc2:menu ID="Menu1" runat="server" />
    <div id="admin-body">
        <h2 class="section-cms">
            送货单 
        </h2>
        <table cellpadding="8" cellspacing="1" border="0">
            <tr>
                <td>提货单号：</td>
                <td><asp:TextBox runat="server" ID="txtRbno"></asp:TextBox></td>
                <td>公司名称：</td>
                <td><asp:TextBox runat="server" ID="txtCompany"></asp:TextBox></td>
                <td><asp:Button ID="bt_query" runat="server" Text="查询" onclick="bt_query_Click" /><input type="button" id="Button1" onclick="openDetail()" value="打印全部" /> </td>
            </tr>
        </table> 
        <div id="admin_list_content">
                        <table cellpadding="0" cellspacing="0">
                            <tr class="header-row">
                                <th>
                                    订单号
                                </th>
                                <th>
                                    订单金额
                                </th>                               
                                <th>
                                    运费
                                </th>
                                <th>
                                    税费
                                </th>
                                 <th>
                                    客户
                                </th>
                                <th>
                                    收货日期
                                </th>
                                <th>
                                    打印送货单
                                </th>                                
                            </tr>
                            <asp:Repeater ID="rpt_list" runat="server">
                                <ItemTemplate>
                                    <tr class='<%# Container.ItemIndex%2==0? "alt":"row-alt"  %>'>
                                        <td>
                                            <%# Eval("orderno")%>
                                        </td>
                                        <td align="right">
                                            <%#string.Format("{0:F2}", Eval("amount"))%>
                                        </td>
                                        <td align="right">
                                            <%#string.Format("{0:F2}",  Eval("fireightFee"))%>
                                        </td>
                                        <td align="right">
                                            <%# string.Format("{0:F2}", Eval("taxfee"))%>
                                        </td>
                                        <td align="center">
                                            <%# Eval("company")%>
                                        </td>
                                        <td align="center">
                                            <%#Convert.ToDateTime(Eval("receivedt")).ToString("yyyy-MM-dd HH:mm")%>
                                        </td>
                                        <td align="center">
                                            <a href="reportcustomerdetail.aspx?rb=<%# Eval("rbno") %>&order=<%# Eval("orderno") %>" target="_blank">打 印</a><br />
                                            <a style='<%#Convert.ToInt32(Eval("companyid"))==138?"":"display:none"%>' href="reportcustomerdetail.aspx?rb=<%# Eval("rbno") %>&order=<%# Eval("orderno") %>" target="_blank">打印无价格配送单</a>
                                        </td>                                        
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                            <tr id="tr_none" runat="server" style="height:30px">
                                <td colspan="7" align="center">没有查询到数据</td>
                            </tr>
                        </table>                        

        </div>
       
    </div>
    </form>
</body>
</html>

